\(\int \cos ^2(a+b x) \sin ^3(2 a+2 b x) \, dx\) [143]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 28 \[ \int \cos ^2(a+b x) \sin ^3(2 a+2 b x) \, dx=-\frac {4 \cos ^6(a+b x)}{3 b}+\frac {\cos ^8(a+b x)}{b} \]

[Out]

-4/3*cos(b*x+a)^6/b+cos(b*x+a)^8/b

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {4372, 2645, 14} \[ \int \cos ^2(a+b x) \sin ^3(2 a+2 b x) \, dx=\frac {\cos ^8(a+b x)}{b}-\frac {4 \cos ^6(a+b x)}{3 b} \]

[In]

Int[Cos[a + b*x]^2*Sin[2*a + 2*b*x]^3,x]

[Out]

(-4*Cos[a + b*x]^6)/(3*b) + Cos[a + b*x]^8/b

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2645

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 4372

Int[(cos[(a_.) + (b_.)*(x_)]*(e_.))^(m_.)*sin[(c_.) + (d_.)*(x_)]^(p_.), x_Symbol] :> Dist[2^p/e^p, Int[(e*Cos
[a + b*x])^(m + p)*Sin[a + b*x]^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && EqQ[b*c - a*d, 0] && EqQ[d/b, 2]
&& IntegerQ[p]

Rubi steps \begin{align*} \text {integral}& = 8 \int \cos ^5(a+b x) \sin ^3(a+b x) \, dx \\ & = -\frac {8 \text {Subst}\left (\int x^5 \left (1-x^2\right ) \, dx,x,\cos (a+b x)\right )}{b} \\ & = -\frac {8 \text {Subst}\left (\int \left (x^5-x^7\right ) \, dx,x,\cos (a+b x)\right )}{b} \\ & = -\frac {4 \cos ^6(a+b x)}{3 b}+\frac {\cos ^8(a+b x)}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.71 \[ \int \cos ^2(a+b x) \sin ^3(2 a+2 b x) \, dx=\frac {-72 \cos (2 (a+b x))-12 \cos (4 (a+b x))+8 \cos (6 (a+b x))+3 \cos (8 (a+b x))}{384 b} \]

[In]

Integrate[Cos[a + b*x]^2*Sin[2*a + 2*b*x]^3,x]

[Out]

(-72*Cos[2*(a + b*x)] - 12*Cos[4*(a + b*x)] + 8*Cos[6*(a + b*x)] + 3*Cos[8*(a + b*x)])/(384*b)

Maple [A] (verified)

Time = 0.94 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.86

method result size
parallelrisch \(\frac {-72 \cos \left (2 x b +2 a \right )-199+3 \cos \left (8 x b +8 a \right )+8 \cos \left (6 x b +6 a \right )-12 \cos \left (4 x b +4 a \right )}{384 b}\) \(52\)
default \(-\frac {3 \cos \left (2 x b +2 a \right )}{16 b}-\frac {\cos \left (4 x b +4 a \right )}{32 b}+\frac {\cos \left (6 x b +6 a \right )}{48 b}+\frac {\cos \left (8 x b +8 a \right )}{128 b}\) \(58\)
risch \(-\frac {3 \cos \left (2 x b +2 a \right )}{16 b}-\frac {\cos \left (4 x b +4 a \right )}{32 b}+\frac {\cos \left (6 x b +6 a \right )}{48 b}+\frac {\cos \left (8 x b +8 a \right )}{128 b}\) \(58\)

[In]

int(cos(b*x+a)^2*sin(2*b*x+2*a)^3,x,method=_RETURNVERBOSE)

[Out]

1/384*(-72*cos(2*b*x+2*a)-199+3*cos(8*b*x+8*a)+8*cos(6*b*x+6*a)-12*cos(4*b*x+4*a))/b

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.93 \[ \int \cos ^2(a+b x) \sin ^3(2 a+2 b x) \, dx=\frac {3 \, \cos \left (b x + a\right )^{8} - 4 \, \cos \left (b x + a\right )^{6}}{3 \, b} \]

[In]

integrate(cos(b*x+a)^2*sin(2*b*x+2*a)^3,x, algorithm="fricas")

[Out]

1/3*(3*cos(b*x + a)^8 - 4*cos(b*x + a)^6)/b

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 362 vs. \(2 (22) = 44\).

Time = 2.05 (sec) , antiderivative size = 362, normalized size of antiderivative = 12.93 \[ \int \cos ^2(a+b x) \sin ^3(2 a+2 b x) \, dx=\begin {cases} - \frac {3 x \sin ^{2}{\left (a + b x \right )} \sin ^{3}{\left (2 a + 2 b x \right )}}{16} - \frac {3 x \sin ^{2}{\left (a + b x \right )} \sin {\left (2 a + 2 b x \right )} \cos ^{2}{\left (2 a + 2 b x \right )}}{16} - \frac {3 x \sin {\left (a + b x \right )} \sin ^{2}{\left (2 a + 2 b x \right )} \cos {\left (a + b x \right )} \cos {\left (2 a + 2 b x \right )}}{8} - \frac {3 x \sin {\left (a + b x \right )} \cos {\left (a + b x \right )} \cos ^{3}{\left (2 a + 2 b x \right )}}{8} + \frac {3 x \sin ^{3}{\left (2 a + 2 b x \right )} \cos ^{2}{\left (a + b x \right )}}{16} + \frac {3 x \sin {\left (2 a + 2 b x \right )} \cos ^{2}{\left (a + b x \right )} \cos ^{2}{\left (2 a + 2 b x \right )}}{16} - \frac {\sin ^{2}{\left (a + b x \right )} \sin ^{2}{\left (2 a + 2 b x \right )} \cos {\left (2 a + 2 b x \right )}}{2 b} - \frac {49 \sin ^{2}{\left (a + b x \right )} \cos ^{3}{\left (2 a + 2 b x \right )}}{96 b} + \frac {13 \sin {\left (a + b x \right )} \sin ^{3}{\left (2 a + 2 b x \right )} \cos {\left (a + b x \right )}}{16 b} + \frac {7 \sin {\left (a + b x \right )} \sin {\left (2 a + 2 b x \right )} \cos {\left (a + b x \right )} \cos ^{2}{\left (2 a + 2 b x \right )}}{8 b} + \frac {17 \cos ^{2}{\left (a + b x \right )} \cos ^{3}{\left (2 a + 2 b x \right )}}{96 b} & \text {for}\: b \neq 0 \\x \sin ^{3}{\left (2 a \right )} \cos ^{2}{\left (a \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(cos(b*x+a)**2*sin(2*b*x+2*a)**3,x)

[Out]

Piecewise((-3*x*sin(a + b*x)**2*sin(2*a + 2*b*x)**3/16 - 3*x*sin(a + b*x)**2*sin(2*a + 2*b*x)*cos(2*a + 2*b*x)
**2/16 - 3*x*sin(a + b*x)*sin(2*a + 2*b*x)**2*cos(a + b*x)*cos(2*a + 2*b*x)/8 - 3*x*sin(a + b*x)*cos(a + b*x)*
cos(2*a + 2*b*x)**3/8 + 3*x*sin(2*a + 2*b*x)**3*cos(a + b*x)**2/16 + 3*x*sin(2*a + 2*b*x)*cos(a + b*x)**2*cos(
2*a + 2*b*x)**2/16 - sin(a + b*x)**2*sin(2*a + 2*b*x)**2*cos(2*a + 2*b*x)/(2*b) - 49*sin(a + b*x)**2*cos(2*a +
 2*b*x)**3/(96*b) + 13*sin(a + b*x)*sin(2*a + 2*b*x)**3*cos(a + b*x)/(16*b) + 7*sin(a + b*x)*sin(2*a + 2*b*x)*
cos(a + b*x)*cos(2*a + 2*b*x)**2/(8*b) + 17*cos(a + b*x)**2*cos(2*a + 2*b*x)**3/(96*b), Ne(b, 0)), (x*sin(2*a)
**3*cos(a)**2, True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.79 \[ \int \cos ^2(a+b x) \sin ^3(2 a+2 b x) \, dx=\frac {3 \, \cos \left (8 \, b x + 8 \, a\right ) + 8 \, \cos \left (6 \, b x + 6 \, a\right ) - 12 \, \cos \left (4 \, b x + 4 \, a\right ) - 72 \, \cos \left (2 \, b x + 2 \, a\right )}{384 \, b} \]

[In]

integrate(cos(b*x+a)^2*sin(2*b*x+2*a)^3,x, algorithm="maxima")

[Out]

1/384*(3*cos(8*b*x + 8*a) + 8*cos(6*b*x + 6*a) - 12*cos(4*b*x + 4*a) - 72*cos(2*b*x + 2*a))/b

Giac [A] (verification not implemented)

none

Time = 0.46 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.93 \[ \int \cos ^2(a+b x) \sin ^3(2 a+2 b x) \, dx=\frac {3 \, \cos \left (b x + a\right )^{8} - 4 \, \cos \left (b x + a\right )^{6}}{3 \, b} \]

[In]

integrate(cos(b*x+a)^2*sin(2*b*x+2*a)^3,x, algorithm="giac")

[Out]

1/3*(3*cos(b*x + a)^8 - 4*cos(b*x + a)^6)/b

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.93 \[ \int \cos ^2(a+b x) \sin ^3(2 a+2 b x) \, dx=-\frac {\frac {4\,{\cos \left (a+b\,x\right )}^6}{3}-{\cos \left (a+b\,x\right )}^8}{b} \]

[In]

int(cos(a + b*x)^2*sin(2*a + 2*b*x)^3,x)

[Out]

-((4*cos(a + b*x)^6)/3 - cos(a + b*x)^8)/b